package com.open.capacity.activity.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.common.model.ResumeActivity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * @program: open-capacity-platform
 * @description:简历——活动关联
 * @author: bellweather
 * @create: 2021-01-19 16:54
 **/
@Mapper
public interface ResumeActivityDao  extends BaseMapper<ResumeActivity> {
    @Insert("insert into resume_activity(resume_id,activity_id) values (#{resume.id},#{activity.id})")
    @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
    int save(ResumeActivity resumeActivity);

    List<ResumeActivity> getList(Map<String,Object> params);

    @Update("update resume_activity set deleted=0 where id=#{id}")
    int delelte(long id);

}
